home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / python-support / python2.6 / xdg / Exceptions.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  3.8 KB  |  80 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''
  5. Exception Classes for the xdg package
  6. '''
  7. debug = False
  8.  
  9. class Error(Exception):
  10.     
  11.     def __init__(self, msg):
  12.         self.msg = msg
  13.         Exception.__init__(self, msg)
  14.  
  15.     
  16.     def __str__(self):
  17.         return self.msg
  18.  
  19.  
  20.  
  21. class ValidationError(Error):
  22.     
  23.     def __init__(self, msg, file):
  24.         self.msg = msg
  25.         self.file = file
  26.         Error.__init__(self, "ValidationError in file '%s': %s " % (file, msg))
  27.  
  28.  
  29.  
  30. class ParsingError(Error):
  31.     
  32.     def __init__(self, msg, file):
  33.         self.msg = msg
  34.         self.file = file
  35.         Error.__init__(self, "ParsingError in file '%s', %s" % (file, msg))
  36.  
  37.  
  38.  
  39. class NoKeyError(Error):
  40.     
  41.     def __init__(self, key, group, file):
  42.         Error.__init__(self, "No key '%s' in group %s of file %s" % (key, group, file))
  43.         self.key = key
  44.         self.group = group
  45.  
  46.  
  47.  
  48. class DuplicateKeyError(Error):
  49.     
  50.     def __init__(self, key, group, file):
  51.         Error.__init__(self, "Duplicate key '%s' in group %s of file %s" % (key, group, file))
  52.         self.key = key
  53.         self.group = group
  54.  
  55.  
  56.  
  57. class NoGroupError(Error):
  58.     
  59.     def __init__(self, group, file):
  60.         Error.__init__(self, 'No group: %s in file %s' % (group, file))
  61.         self.group = group
  62.  
  63.  
  64.  
  65. class DuplicateGroupError(Error):
  66.     
  67.     def __init__(self, group, file):
  68.         Error.__init__(self, 'Duplicate group: %s in file %s' % (group, file))
  69.         self.group = group
  70.  
  71.  
  72.  
  73. class NoThemeError(Error):
  74.     
  75.     def __init__(self, theme):
  76.         Error.__init__(self, 'No such icon-theme: %s' % theme)
  77.         self.theme = theme
  78.  
  79.  
  80.